home *** CD-ROM | disk | FTP | other *** search
/ Champak 114 / Vol 114.iso / games / spongebo.swf / scripts / frame_57 / DoAction.as
Encoding:
Text File  |  2010-08-12  |  1.5 KB  |  53 lines

  1. scripts.gameOverMusic.stop();
  2. menuLoopPlaying == false;
  3. stopAllSounds();
  4. scroller._y = 700;
  5. loadScores = null;
  6. app.submitPath = "/common/score/Scoreboard.jhtml?msg=S&limitEntries=true&game=sb_panic&name=" + app.myscreenName + "&score=" + String(app.gameScore);
  7. loadScores = new LoadVars();
  8. loadScores.load(app.basePath + app.submitPath);
  9. loadScores.onLoad = function()
  10. {
  11.    trace("load complete");
  12.    if(this.msg == "EE")
  13.    {
  14.       if(this.text == "no scores available for that game (sb_panic)")
  15.       {
  16.          MSGtext = "Sorry, the high-score list is empty!";
  17.       }
  18.       else
  19.       {
  20.          MSGtext = "Oops, the high-score list isnΓÇÖt available right now!";
  21.       }
  22.       gotoAndStop("displayError");
  23.    }
  24.    else
  25.    {
  26.       myScoreFlag = true;
  27.       z = 0;
  28.       while(z < 100)
  29.       {
  30.          nVar = eval("this.pn" + z);
  31.          sVar = eval("this.ps" + z);
  32.          scrollVar = eval("scroller.contentMain.score" + (z + 1));
  33.          scrollVar.gotoAndStop(1);
  34.          if(myScoreFlag)
  35.          {
  36.             if(app.gameScore == sVar && app.myscreenName == nVar)
  37.             {
  38.                trace("found my sub score at:" + z);
  39.                myScoreFlag = false;
  40.                scrollVar.gotoAndStop("hi");
  41.             }
  42.          }
  43.          scrollVar.placeval = z + 1;
  44.          scrollVar.nameval = nVar;
  45.          scrollVar.scoreval = sVar;
  46.          z++;
  47.       }
  48.       gotoAndStop("displayScores");
  49.       play();
  50.    }
  51. };
  52. stop();
  53.